---
title: Invoke job by enum environment, key/value parameters
summary: Converts a UC4Environment enum value to a client id and delegates to the client-id, key/value-parameters flow. Marked Obsolete on the contract.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-22
operation_id: OP-007
trigger: A SOAP caller invokes ExecuteJobWithParameters on the UC4 route
---

# OP-007: Invoke job by enum environment, key/value parameters (Obsolete)

This process backs the `ExecuteJobWithParameters` operation, which is marked **`[Obsolete]`** on the contract — see [Operations](../operations.md). It converts a `UC4Environment` enum value to a client id, then delegates to [OP-008](execute-job-with-parameters-and-client-id.md). **Transaction boundary: none.**

| Field | Value |
| --- | --- |
| **Operation ID** | OP-007 |
| **Trigger** | SOAP caller invokes `ExecuteJobWithParameters` |
| **Entry operation** | [`ExecuteJobWithParameters`](../contracts/uc4-service.md#executejobwithparameters) (Obsolete) |
| **Owning component** | `UC4Service.ExecuteJobWithParameters` |
| **Inputs** | `environment` (`UC4Environment` enum), `jobName` (`string`), `parameters` (key/value collection) |
| **Outputs** | `UC4Result` — the mapped downstream result, or an empty result if the job is blocked |
| **Failure behavior** | Identical to [OP-008](execute-job-with-parameters-and-client-id.md) — an unhandled exception surfaces as a generic SOAP fault carrying full exception detail |

## Request and response

| Direction | Element | Type | Declared in | Notes |
| --- | --- | --- | --- | --- |
| Request | `environment` | `UC4Environment` enum | `UC4Service.cs` | Converted to a client id before use |
| Request | `jobName` | `string` | `UC4Service.cs` | The job to invoke |
| Request | `parameters` | key/value collection | `UC4Service.cs` | Passed through unchanged |
| Response | `<return>` | `UC4Result`* | `UC4Service.cs` | Mapped downstream result, or an empty `UC4Result` if blocked |

## Steps

1. Accept `environment` (enum), `jobName`, and `parameters` from the SOAP request — see [BR-UC4-006](../business-rules.md#br-uc4-006-enum-operation-forms-are-obsolete).
2. Convert `environment` to a client id via `UC4EnvironmentFactory.GetUC4ClientId(environment)`.

   > **Origin**: Step 2 is implemented in `UC4EnvironmentFactory` (`SAIF.Framework.Core`, external, not documented by this run) and executed within this operation.*
   - On failure: an unmapped enum value throws → detailed WCF fault.*
3. Delegate to `ExecuteJobWithParametersAndClientId(clientId, jobName, parameters)`.

   > **Origin**: Step 3 delegates into [OP-008: Invoke job by client id, key/value parameters](execute-job-with-parameters-and-client-id.md), documented by this run.
   - On failure: any failure mode of the delegated flow surfaces identically here.
4. Return the result produced by the delegated flow to the caller.

## Process flow

```mermaid
flowchart TD
    A["Accept environment (enum),<br>jobName, parameters"] --> B["Convert enum to<br>client id"]
    B -->|"unmapped enum"| BFAULT["Detailed WCF fault"]
    B --> C["Delegate to<br>ExecuteJobWithParametersAndClientId"]
    C --> D{"Delegated flow<br>succeeds?"}
    D -->|"Yes"| E["Return UC4Result"]
    D -->|"No"| F["Detailed WCF fault<br>from delegated flow"]
```

## Transaction and side effects

| Aspect | Finding |
| --- | --- |
| Unit of work | None |
| Commit point | Not applicable — no persistence |
| Records written | None locally |
| Downstream calls | Same as [OP-008](execute-job-with-parameters-and-client-id.md) |
| Shared state touched | None |
| Repeat-call behavior | Not idempotent from the host's perspective |

## Faults and error handling

| Failure | Fault type the caller receives | Produced by | Source |
| --- | --- | --- | --- |
| Unmapped enum value | Generic SOAP fault, full exception detail | The WCF framework | `UC4Service.cs` |
| Any failure mode of the delegated flow | Generic SOAP fault, full exception detail | The WCF framework — no `IErrorHandler` is confirmed for this class | `UC4Service.cs` (delegation site) |

`UC4Service` carries `[LogErrorBehavior]`, an external `IServiceBehavior` whose implementation is not in this repository; its contribution is observability, not fault shaping — see [Faults and error pipeline](../faults.md).

## Authorization

| Requirement | Enforced by | Source | Applies to |
| --- | --- | --- | --- |
| [None in code](../authentication-authorization.md#access-requirements-per-operation) | Nothing — no attribute or programmatic check exists | `UC4Service.cs` | This operation |

## Related documentation
- [Index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Activation and hosting](../activation-hosting.md)
- [Operations](../operations.md)
- [Faults and error pipeline](../faults.md)
- [Authentication and authorization](../authentication-authorization.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Operational runbook](../operational-runbook.md)
- [Tech debt](../tech-debt.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- `src/WCF/SAIF.Services.WCF.UC4.Host/UC4Service.cs`
